﻿<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <link href="~/css/framework-font.css" rel="stylesheet" />
    <link href="~/css/framework-theme.css" rel="stylesheet" />
    <script src="~/lib/jquery/1.12.4/jquery.min.js"></script>
    <script src="~/lib/bootstrap/3.3.4/js/bootstrap.min.js"></script>
    <link href="~/lib/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" />
    <script src="~/lib/wdtree/tree.js"></script>
    <link href="~/lib/wdtree/tree.css" rel="stylesheet" />
    <link href="~/lib/select2/select2.min.css" rel="stylesheet" />
    <script src="~/lib/select2/select2.min.js"></script>
    <script src="~/lib/laydate/laydate.js"></script>
    <script src="~/lib/moment/moment.js"></script>
    <link href="~/lib/wizard/wizard.css" rel="stylesheet" />
    <script src="~/lib/wizard/wizard.js"></script>
    <script src="~/lib/validate/jquery.validate.min.js"></script>
    <script src="~/lib/datepicker/WdatePicker.js"></script>
    <script src="~/lib/jqgrid/5.3.0/i18n/grid.locale-cn.js"></script>
    <link href="~/css/framework-ui.css" rel="stylesheet" />
    <script src="~/js/framework-ui.js"></script>
</head>
<body>


    <link href="/lib/simditor/css/simditor.css" rel="stylesheet" />
    <script src="/lib/simditor/js/module.min.js"></script>
    <script src="/lib/simditor/js/hotkeys.min.js"></script>
    <script src="/lib/simditor/js/simditor.min.js"></script>
    <style>
        .simditor {
            border-left: none;
            border-right: none;
            border-top: none;
        }
    </style>
    <script>
        var editor;
        $(function () {
            editor = new Simditor({
                textarea: $('#content'),
                toolbar: ['title', 'bold', 'italic', 'underline', 'strikethrough', 'color', '|', 'ol', 'ul', 'blockquote', 'code', 'table', '|', 'link', 'image', 'hr', '|', 'indent', 'outdent']
            });
        });
        function submitForm() {
            if (!$('#form1').formValid()) {
                return false;
            }
            var postData = $("#form1").formSerialize();
            postData["content"] = editor.getValue();
            $.submitForm({
                loading: "正在发送邮件...",
                url: "/ExampleManage/SendMail/SendMail",
                param: $("#form1").formSerialize(),
                success: function () {
                    $.reload();
                }
            })
        }
    </script>
    <form id="form1">
        <div class="mail-box">
            <div class="mail-header">写邮件</div>
            <div class="mail-body">
                <table class="form">
                    <tr>
                        <th class="formTitle">发送到 </th>
                        <td class="formValue">
                            <input id="account" name="account" type="text" class="form-control required" placeholder="输入多个邮件地址请用英文符号;隔开" />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">主题</th>
                        <td class="formValue">
                            <input id="title" name="title" type="text" class="form-control required" />
                        </td>
                    </tr>
                </table>
            </div>
            <div class="mail-body" style="padding: 0px;">
                <textarea id="content" name="content" class="form-control" rows="5"></textarea>
            </div>
            <div class="mail-body" style="text-align: right;">
                <a href="javascript:void()" onclick="submitForm()" class="btn btn-primary" style="margin-right: 5px;"><i class="fa fa-reply"></i>发送</a>
                <a href="javascript:void()" class="btn btn-warning"><i class="fa fa-pencil"></i>存为草稿</a>
            </div>
        </div>
    </form>
</body>
</html>
